<?php
/**
 * Created by PhpStorm.
 * User: lantranduc
 * Date: 5/22/14
 * Time: 4:08 PM
 */
?>

<div class="main-content">
<br/>
    <h1 style="font-size:30px;color:red;text-align:center;">List Links</h1><br/>
<div class="div-content" style="height: 400px"> <?php
    $listLinks=array();
    for($i=0;$i<count($links);$i++){
        if($links[$i]['status']==0){
            $listLinks[]=$links[$i]['link'];
        }
    }
    if(count($listLinks)>0){
        foreach($listLinks as $i => $vl){
            echo ($i+1).".".$vl."<br/>";
        }
    }
?></div>
    <br/><h1 style="text-align:right;">Total : <?php echo count($listLinks); ?> link(s)
        <a href="<?php echo $this->Html->url(array('controller'=>'pages','action'=>'display')) ?>">(add more)</a></h1>

</div>